<table>
    <thead>
        <tr>
            <g:sortableColumn property="serialNumber" title="${message(code: 'contract.serialNumber.label', default: 'Contract Number')}" />
            <g:sortableColumn property="subject" title="${message(code: 'contract.subject.label', default: 'Subject')}" />
            <g:sortableColumn property="recordType" title="${message(code: 'contract.recordType.label', default: 'RecordType')}" />
            <g:sortableColumn property="applicant" title="${message(code: 'contract.applicant.label', default: 'Applicant')}" />
            <g:sortableColumn property="filingDate" title="${message(code: 'contract.filingDate.label', default: 'Filing Date')}" />
            <g:sortableColumn property="effectiveDate" title="${message(code: 'contract.effectiveDate.label', default: 'Effective Date')}" />
            <g:sortableColumn property="dealer" title="${message(code: 'contract.dealer.label', default: 'Dealer')}" />
            <g:sortableColumn property="project" title="${message(code: 'contract.project.label', default: 'Project')}" />
            <g:sortableColumn property="industry" title="${message(code: 'contract.industry.label', default: 'Industry')}" />
        </tr>
    </thead>
    <tbody>
    <g:each in="${contractInstanceList}" status="i" var="contractInstance">
        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
            <td><g:link action="show" id="${contractInstance.id}">${fieldValue(bean: contractInstance, field: "serialNumber")}</g:link></td>
            <td>${fieldValue(bean: contractInstance, field: "subject")}</td>
            <td>${fieldValue(bean: contractInstance, field: "recordType")}</td>
            <td>${fieldValue(bean: contractInstance, field: "applicant")}</td>
            <td><g:formatDate date="${contractInstance.filingDate}" /></td>
            <td><g:formatDate date="${contractInstance.effectiveDate}" /></td>
            <td>${fieldValue(bean: contractInstance, field: "dealer")}</td>
            <td>${fieldValue(bean: contractInstance, field: "project")}</td>
            <td>${fieldValue(bean: contractInstance, field: "industry")}</td>
        </tr>
    </g:each>
    </tbody>
</table>
